package com.zhuang.arraylist.cloneDemo;

public class Employee {
	// 姓名
	private String name;
	// 年龄
	private int age;

	public Employee() {
	}

	public Employee(String name, Integer age) {
		this.name = name;
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	@Override
	public String toString() {
		// 优化toString方法
		StringBuilder sb = new StringBuilder();
		sb.append("[").append("name = ").append(this.name).append(", ").append("age =").append(this.age).append("]");
		return sb.toString();
	}
}
